This specification relates to managing device data for software applications in an application execution environment (e.g., a virtual machine or a runtime environment). Application execution environments operate on many computing platforms (e.g., personal computers, laptops, personal digital assistants, smartphones or cellular phones). The variety and prevalence of platforms is increasing while their size and cost is often decreasing. Consequently, there is also strong demand for software that runs on the various platforms.
Computing platforms often include an operating system (OS) (e.g., WINDOWS®, MAC OS®, LINUX®, SYMBIAN OS, MAEMO, PALM® OS or WINDOWS® MOBILE). An operating system is a set of computer programs that manage the hardware and software resources of a computer. An operating system processes raw system and user input and responds by allocating and managing tasks and internal system resources as a service to users and programs of the system. Fundamentally, an operating system performs basic tasks such as controlling and allocating memory, prioritizing system requests, controlling output devices (e.g., audio speakers or visual displays), responding to input devices (e.g., mice, keyboards, styluses, cameras or touch screens), facilitating networking and managing file systems. An operating system also provides an execution environment for which software developers write applications that interact with the system services.
Software developers often write an application in a programming language (e.g., C++) and then compile the application for a specific operating system (e.g., LINUX®). If a software developer compiles an application for an operating system, the application is not generally compatible with a different operating system. To alleviate dependence on a particular operating system, software developers have built application execution environments. The developers create several variants of an execution environment built to run on different operating systems but each variant is capable of running the same applications. An application developer can write one program that will run on each variant without modification or recompiling. Application execution environments often provide a set of services similar to an operating system including interactivity with input devices. Application execution environments include the JAVA® Virtual Machine (JVM) (available from Sun Microsystems, Inc.), ADOBE® FLASH® Player and ADOBE® Integrated Runtime (both available from Adobe Systems Incorporated).
Some input devices connected to a computing platform produce data that is immediately provided after production. The data is known as real-time data and is often continuously provided by the device. For instance, a camera may continually capture image data and immediately provide the data to the system. Other real-time data input devices include accelerometers, Global Positioning System (GPS) receivers, touch screens, microphones, mice, gyroscopes and thermometers. Operating systems commonly allow software applications at least some access to the data the devices produce, and programmers have written programs that access such data. For example, one program on a ThinkPad laptop computer accesses the data generated by an accelerometer device in the laptop to draw a picture of the laptop on the screen and rotate the picture as one rotates the laptop. Another example is a computer having two operating systems, where data from an accelerometer is monitored such that, when a large jolt occurs (e.g., from a person slapping the side of the computer), the computer switches which of the two operating systems is exposed to the user.